<?php $url = "http://" . trim($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], "/")?>
<?php
$actions=explode('\\', \Route::current()->getActionName());
$modelName=$actions[count($actions)-2]=='Controllers'?null:$actions[count($actions)-2];
$func=explode('@', $actions[count($actions)-1]);
$controllerName =  $controllerName=$func[0];
?>
<div class="header">
    <div class="layui-main">
        <div class="logo">

        </div>
        <ul class="nav">
            <li @if($url== url('')) class="active" @endif>
                <a href="{{url('')}}">首页<!-- <span class="layui-badge-dot"></span> --></a>
            </li>
            <li @if($controllerName == 'ProductController') class="active" @endif>
                <a href="{{url('/list')}}">职位<!--  --></a>
            </li>
            <li @if(($controllerName == 'MemberController') || ($controllerName == 'AuditionController')) class="active" @endif>
                <a href="{{url('/member')}}">我的<!--  --></a>
            </li>
        </ul>
        <div class="handle">
            <a class="recruit" href="javascript:;">我要招聘</a>
            <a class="apply" href="javascript:;">我要求职</a>
        </div>
    </div>
</div>